package com.test;

public class LoginService {
	private UsersDao usersDao;

	public UsersDao getUsersDao() {
		return usersDao;
	}

	public void setUsersDao(UsersDao usersDao) {
		this.usersDao = usersDao;
	}
	
	public boolean isLogin(Users users){
		boolean flag = false;
		Users u = usersDao.getUsers(users.getName());
		if(u!=null&&u.getPassword().equals(users.getPassword())){
			flag = true;
		}else{
			flag = false;
		}
		return flag;
		
	}
}
